package util.common;

import java.io.File;
import java.io.FilenameFilter;

public class DirectoryUtils {
    public static boolean exist(String path){
        return new File(path).exists();
    }

    public static void createDirectory(String path){
        File file = new File(path);
        if (!file.exists()){
            file.mkdirs();
        }
    }

    public static String[] getFiles(String path){
        return new File(path).list();
    }

    public static String[] getFiles(String path, FilenameFilter filter){
        return new File(path).list(filter);
    }

}
